package com.shao.commons.domain;

public enum Codes {

    SUCCESS(200, "成功"),
    FAIL(500, "服务器异常"),
    NOT_POWER(501, "权限不足"),
    PARAMS_BIND(502, "参数校验失败"),
    USER_EXIST(503, "用户名已存在"),
    EMAIL_EXIST(504, "邮箱已存在"),
    FILE_NOT_FOUND(505, "文件未找到"),
    LOGIN_FAIL(506, "用户名或密码错误"),
    USER_NOT_FOUND(507, "用户不存在"),
    AUTH_ERROR(508, "令牌为空或者已过期"),
    CODE_ERROR(509, "验证码错误"),
    NOT_REQUEST_SELF(510, "不能添加自己为好友"),
    REQUEST_EXIST(511, "不能重复发送好友申请"),
    IS_FRIENDS(512, "已经是好友");


    private final Integer code;
    private final String msg;

    Codes(Integer code, String msg) {
        this.code = code;
        this.msg = msg;
    }

    public Integer getCode() {
        return code;
    }

    public String getMsg() {
        return msg;
    }
}
